package cn.zwx.member.svc.rpc.dto;

import lombok.Data;
import org.apache.dubbo.apidocs.annotations.RequestParam;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author zhangwenxue
 */
@Data
public class AuthenticationDTO {

    @NotBlank(message = "用户id不能为空")
    @RequestParam(value = "用户id",required = true)
    private String userId;
    @NotBlank(message = "身份证号码不能为空")
    @Pattern(regexp = "(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)",message = "身份证号码不合法")
    @RequestParam(value = "身份证号码",required = true)
    private String idCard;
    @NotBlank(message = "真实姓名不能为空")
    @Length(max = 32,message = "真实姓名长度不能超过32位")
    @RequestParam(value = "真实姓名",required = true)
    private String realName;
}
